import { createRouter, createWebHistory } from 'vue-router';
import HomePage from '../pages/HomePage.vue';
import RestaurantDetail from '../pages/RestaurantDetail.vue'; // 确保文件名正确
import UserProfile from '../pages/UserProfile.vue';

const routes = [
  { path: '/', component: HomePage },
  { path: '/restaurant-detail', component: RestaurantDetail, props: true },
  { path: '/profile', component: UserProfile }
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;